// DMS Donations Management System v1.0                 
// created by:  Isaac Sabas                   
//				Nikko Reyes
//				Miko Tiamwatt          
//                                                      
// De La Salle Philippines                              
// All Rights Reserved DLSP Copyright 2009 


// DEVELOPMENT NOTE:
// this part of code is for review, we can remove some lines after development
	loader = new YAHOO.util.YUILoader(); 
	loader.require("calendar"); 
	loader.loadOptional = true;			
	loader.base = 'lib/YUI/yui/build'; 	
	loader.insert();
			
// create the namespace to use
	YAHOO.namespace("dms");

// create the global variables to use 
// these are the arrays that hold all the instances of the windows (the names of the array correspond to the said windows the hold)
	YAHOO.dms.dashboard_client_windows = Array();
	YAHOO.dms.dashboard_clientprofile_windows = Array();
	YAHOO.dms.dashboard_notification_windows = Array();
	YAHOO.dms.dashboard_ticket_windows = Array();
	YAHOO.dms.dashboard_donationticket_windows = Array();
	YAHOO.dms.dashboard_newticket_windows = Array();
	YAHOO.dms.dashboard_newreferral_windows = Array();
	YAHOO.dms.dashboard_reschedule_windows = Array();
	YAHOO.dms.done_confirmation_dialog = Array();
	YAHOO.dms.received_confirmation_dialog = Array();
	YAHOO.dms.greeting_confirmation_dialog = Array();
	YAHOO.dms.add_referral_dialog = Array();
	YAHOO.dms.cancel_donation_dialog = Array();
	YAHOO.dms.close_donation_dialog = Array();
	YAHOO.dms.reschedule_dialog = Array();
	YAHOO.dms.client_edit_name_dialog = Array();
	YAHOO.dms.client_edit_gender_dialog = Array();
	YAHOO.dms.client_edit_school_dialog = Array();
	YAHOO.dms.client_edit_course_dialog = Array();
	YAHOO.dms.client_edit_graduate_dialog = Array();
	YAHOO.dms.client_edit_company_dialog = Array();
	YAHOO.dms.client_edit_position_dialog = Array();



// client window modal dialog arrays


// Initialize and render the menu when it is available in the DOM			
	function init() {	

		// define various event  handlers for Dialog				
			var handleCancel = function() {
				this.cancel();
			};								

		// instantiate the tabs 
			// dashboard tabs
				var dashboard = new YAHOO.widget.TabView('dashboard');
			// left pane notification tab
				var left_pane_notification_tab = new YAHOO.widget.TabView('left_pane_notification_tab');	
			// calendar tab			
				var left_pane_calendar_tab = new YAHOO.widget.TabView('left_pane_calendar_tab');				
			// clients to call list tab on the dashboard view
				var dashboard_client_panels_tab = new YAHOO.widget.TabView('dashboard_clients_panel_tab');
			// notifications tab on the dashboard view
				var dashboard_notifications_panel_tab = new YAHOO.widget.TabView('dashboard_notifications_panel_tab');
			// toolbar tab on the dashboard view
				var dashboard_toolbar_panel_tab = new YAHOO.widget.TabView('dashboard_toolbar_panel_tab');
			// client list on the client view
				var client_main_panel_tab = new YAHOO.widget.TabView('client_main_panel_tab');
			// client toolbar on the client view
				var client_toolbar_panel_tab = new YAHOO.widget.TabView('client_toolbar_panel_tab');

	
		// instantiate the YUI Calendar 
			YAHOO.dms.calendar = new YAHOO.widget.Calendar("calendar","calendar_container"); 
			YAHOO.dms.calendar.render();	 
				  	    	

		//YAHOO.netinternals.window_manager = new YAHOO.widget.OverlayManager(); 			
	}											

YAHOO.util.Event.onDOMReady(init);
